@extends('layouts.comment')
@section('css')
<style>
    td{
        text-align: center;
    }
</style>
@endsection
@section('content')
<div id="dcMain">
    <div id="urHere">租伴 管理中心 > 充值/提现</div>
    <div id="index" class="mainBox" >
        <div class="indexBox">
            <div class="boxTitle">参数设置</div>
            <div class="idTabs">
            <div class="items">
            <form action="system.php?rec=update" method="post" enctype="multipart/form-data">
            <div id="recharge">
                <div class="indexBox">
                	<span><a href="edit_project.html" >【增加配置】</a></span>
                    <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                        <tr>
                            <th style="width: 20%">序号</th>
			                <th style="width: 20%">项目</th>
			                <th style="width: 20%">
			                    <select id="select" onchange="test(this)" >
			                        <option value="">参数类别</option>
			                        <option value ="1" @if(isset($_GET['class'])&&$_GET['class']==1) selected @endif>出租项目</option>
			                        <option value="2" @if(isset($_GET['class'])&&$_GET['class']==2) selected @endif>职业</option>
			                        <option value="3" @if(isset($_GET['class'])&&$_GET['class']==3) selected @endif>个人特长</option>
			                        <option value="4" @if(isset($_GET['class'])&&$_GET['class']==4) selected @endif>出租价格</option>
			                        <option value="5" @if(isset($_GET['class'])&&$_GET['class']==5) selected @endif>评论</option>
			                        <option value="7" @if(isset($_GET['class'])&&$_GET['class']==7) selected @endif>开通会员</option>
			                        <option value="8" @if(isset($_GET['class'])&&$_GET['class']==8) selected @endif>充值租币</option>
			                        <option value="9" @if(isset($_GET['class'])&&$_GET['class']==9) selected @endif>查看微信价格</option>
			                    </select>
			                </th>
            				<th style="width: 40%">操作</th>
                        </tr>
                        @if(!empty($projects))
                        @foreach($projects as $row)
			            <tr>
			                <td>{{$row['id']}}</td>
			                <td>{{$row['project']}}</td>
			                <td>
			                @if('1' == $row['class'])
			                    出租项目
			                @elseif('2' == $row['class'])
			                    工作
			                @elseif('3' == $row['class'])
			                    个人特长
			                @elseif('4' == $row['class'])
			                    出租价格
			                @elseif('5' == $row['class'])
			                    评论
			                @elseif('7' == $row['class'])
			                    开通会员
			                @elseif('8' == $row['class'])
			                    充值租币
			                @elseif('9' == $row['class'])
			                    查看微信价格
			                @endif
			                </td>
			                <td>
			                    <a href="edit_project.html?id={{$row['id']}}">【修改】</a>
			                    <a href="del_project.html?id={{$row['id']}}">【删除】</a>
			                </td>
			            </tr>
			            @endforeach
			            @endif
                    </table>
                    @if(!empty($total))
                    <div class="pager">总计 {{$total}} 个记录，共 {{$pagenum}} 页，当前第 {{$cpage}} 页 | <a href="project.html?page=1">第一页</a> <a href="project.html?page={{$prev}}">上一页</a> <a href="project.html?page={{$next}}">下一页</a> <a href="project.html?page={{$pagenum}}">最末页</a>
                    </div>
                    @endif
                </div>
            </div>
            </form>
            </div>
            </div>
        </div>
    </div>

</div>
@endsection
@section('js')
<script type="text/javascript" src="{{asset('/js')}}/jquery.tab.js"></script>
<script type="text/javascript">
    $(function(){ $(".idTabs").idTabs(); });

    function test(e){
        var val = e.value;
        window.location.href = 'project.html?class='+val;
    }
</script>
@endsection